package com.jinzhi.jzweb.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.jinzhi.common.base.CoreServiceImpl;
import com.jinzhi.jzapi.training.pojo.MyCourseListVo;
import com.jinzhi.jzweb.dao.OrderDao;
import com.jinzhi.jzweb.domain.OrderDO;
import com.jinzhi.jzweb.pojo.TrainingAgencyPageVo;
import com.jinzhi.jzweb.service.OrderService;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 
 * <pre>
 * 订单表
 * </pre>
 * <small> 2020-05-14 09:52:15 | lance</small>
 */
@Service
public class OrderServiceImpl extends CoreServiceImpl<OrderDao, OrderDO> implements OrderService {

    @Override
    public Page<MyCourseListVo> selByStateUserId(int current, int number, Map map) {

        // 新建分页
        Page<MyCourseListVo> page = new Page<MyCourseListVo>(current, number);

        return page.setRecords(this.baseMapper.selByStateUserId(page,map));

    }

    @Override
    public Page<TrainingAgencyPageVo> selTrainingAgency(int current, int number, Map map) {

        // 新建分页
        Page<TrainingAgencyPageVo> page = new Page<TrainingAgencyPageVo>(current, number);

        return page.setRecords(this.baseMapper.selTrainingAgency(page,map));

    }
}
